FROM omega8/diyix:latest
MAINTAINER omega
USER root
EXPOSE 80

RUN wget "http://resource.omega.pw/software/openresty/openresty-ext(for diyix).tar.gz" \
&& tar -zxf "openresty-ext(for diyix).tar.gz" \
&& cd openresty-ext \
&& ./install.sh \
&& cd .. \
&& rm -rf openresty-ext \
&& rm -rf "openresty-ext(for diyix).tar.gz"

CMD ["/bin/sh", "-c", "cd /usr/local/openresty/nginx/sbin && ./nginx -g 'daemon off;'"]
